package top.zackyoung.bbs.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.zackyoung.bbs.entity.Comment;
import top.zackyoung.bbs.entity.Pagination;

import java.util.List;

@Mapper
@Repository
public interface CommentMapper {
    List<Comment> queryComment(@Param("type") Integer type, @Param("commentObjectId") Integer commentObjectId, @Param("page") Integer page, @Param("count") Integer count);
    int queryCommentCount(@Param("type") Integer type, @Param("commentObjectId") Integer commentObjectId);
    int insertComment(@Param("userId") Integer userId, @Param("type") Integer type, @Param("commentObjectId") Integer commentObjectId, @Param("commentContent") String commentContent);
    List<Comment> queryMyComment(Pagination pagination);
    List<Comment> queryMyCommentReply(Pagination pagination);
}